package com.felix.dkwexcel.conf;

import com.felix.dkwexcel.service.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * @author felix.ma
 * @create 2018-06-24 14:54
 */
@Configuration
public class InitStartup implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private ExcelService excelService;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
//        TODO　开始执行
        excelService.export();
    }

}
